<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        .clock {
            width: 600px;
            height: 600px;
            border-radius: 50%;
            border: 10px solid #000;
            margin: 50px auto;
            position: relative;

        }

        .line {
            width: 8px;
            height: 600px;
            background-color: #aaa;
            position: absolute;
            left: 50%;
            top: 0;
            transform: translate(-50%, 0);
        }

        .line1,
        .line4 {
            width: 10px;
        }

        .line2 {
            transform: translate(-50%, 0) rotate(30deg);
        }

        .line3 {
            transform: translate(-50%, 0) rotate(60deg);
        }

        .line4 {
            transform: translate(-50%, 0) rotate(90deg);
        }

        .line5 {
            transform: translate(-50%, 0) rotate(120deg);
        }

        .line6 {
            transform: translate(-50%, 0) rotate(150deg);
        }

        .cover {
            position: absolute;
            width: 500px;
            height: 500px;
            border-radius: 50%;
            background-color: #fff;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%)
        }

        .hour {
            width: 6px;
            height: 150px;
            background-color: red;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -100%);
            transform-origin: center bottom;
            animation: clockAnimation 43200s linear infinite;
        }

        .minute {
            width: 4px;
            height: 180px;
            background-color: blue;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -100%);
            transform-origin: center bottom;
            animation: clockAnimation 3600s linear infinite;
        }

        .second {
            width: 2px;
            height: 200px;
            background-color: palevioletred;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -100%);
            transform-origin: center bottom;
            animation: clockAnimation 60s infinite steps(60);
        }

        .center {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            position: absolute;
            background-color: #ccc;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
        }

        /* @keyframes clockAnimation{
            from{
                transform:translate(-50%,-100%) rotate(0deg);
            }
            to{
                transform:translate(-50%,-100%) rotate(360deg);
            }
        } */
    </style>
</head>

<body>
    <div class="clock">
        <div class="line line1"></div>
        <div class="line line2"></div>
        <div class="line line3"></div>
        <div class="line line4"></div>
        <div class="line line5"></div>
        <div class="line line6"></div>
        <div class="cover"></div>
        <div class="hour"></div>
        <div class="minute"></div>
        <div class="second"></div>
        <div class="center"></div>
    </div>
    <script>
        var second = document.querySelector('.second');
        var minute = document.querySelector('.minute');
        var hour = document.querySelector('.hour');

        function move() {

            var time = new Date();
            var s = time.getSeconds();
            second.style.transform = "translate(-50%,-100%) rotate(" + (s * 6) + "deg)";
            var m = time.getMinutes();
            minute.style.transform = "translate(-50%,-100%) rotate(" + (m * 6) + "deg)";
            var h = time.getHours();
            if (h >= 12) {
                h = h - 12;
            }
            hour.style.transform = "translate(-50%,-100%) rotate(" + (h * 30) + "deg)"
        }
        setInterval(move, 1000);
    </script>
</body>

</html>